<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>浮动</title>
	<style type="text/css">
		.box1{
			width: 200px;
			height: 200px;
			background-color: red;
			float: left;
		}
		.box2{
			width: 200px;
			height: 200px;
			background-color: green;
			float: right;
		}
		.box3{
			width: 300px;
			height: 300px;
			background-color: gray;

		}
		.box4{
			width: 500px;
			height: 500px;
			background-color: yellow;
			position: relative;
		}
		.box5{
			width: 100px;
			height: 100px;
			background-color: gray;
			position: absolute;
			left: 30px;
			top:30px;
		}
		.box6{
			width: 100px;
			height: 100px;
			background-color: red;
			float: right;
			overflow: auto;

		}
		.clear{
			clear: both;
		}
	</style>
</head>
<body>
	<div class="box1"></div>
	<div class="box2"></div>
	<div class="clear"></div>
	<div class="box3"></div>
	<hr />
	<div class="box4">
		<div class="box6">srqrtweqrwqrwerqwe</div>
		<div class="box5">fdgasdfdawd</div>
	</div>

</body>
</html>